package com.bulunsh.wensen.config;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.ViewControllerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

@Configuration
public class WebConfig implements WebMvcConfigurer {




    @Override
    public void addViewControllers(ViewControllerRegistry registry) {
        //这句是完成权限验证的版本 跳转到默认 login.jsp
        //registry.addViewController("/").setViewName("redirect:/login");

        //扩展  跳转到我们自己定义的jsp
        registry.addViewController("/").setViewName("redirect:/login-view");
        registry.addViewController("/login-view").setViewName("login");

    }


}
